import spock.lang.Specification

/**
 * Created at 2017/10/14 18:03
 * @author gongweixin
 */
class TrimExample extends Specification {

    def "test trim map"() {
        def map = [1: " 1 ", 2: " 2 2 "]
        map = map.each { key, value ->
            map[key] = value.trim()
        }

        expect:
        [1: "1", 2: "2 2"] == map
    }
}
